﻿namespace Sidvall.AuthorizationManager.Data.Entity.Entities
{
    public partial class AuthorizationScopeResourceItemClaim : global::Sidvall.Data.DataRowBase, global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim
    {
        #region Public Members

        #region AuthorizationScopeResourceItemClaimId

        private long _AuthorizationScopeResourceItemClaimId;
        public long AuthorizationScopeResourceItemClaimId
        { 
            get
            {
                return _AuthorizationScopeResourceItemClaimId;
            }
            set
            {
                _AuthorizationScopeResourceItemClaimId = value;
            }
        }

        #endregion
        #region AuthorizationScopeResourceItemId

        private long _AuthorizationScopeResourceItemId;
        public long AuthorizationScopeResourceItemId
        { 
            get
            {
                return _AuthorizationScopeResourceItemId;
            }
            set
            {
                _AuthorizationScopeResourceItemId = value;
            }
        }

        #endregion
        #region ClaimType

        private string _ClaimType;
        public string ClaimType
        { 
            get
            {
                return _ClaimType;
            }
            set
            {
                _ClaimType = value;
            }
        }

        #endregion
        #region ComparisonOperator

        private int _ComparisonOperator;
        public int ComparisonOperator
        { 
            get
            {
                return _ComparisonOperator;
            }
            set
            {
                _ComparisonOperator = value;
            }
        }

        #endregion
        #region IsEnabled

        private bool _IsEnabled;
        public bool IsEnabled
        { 
            get
            {
                return _IsEnabled;
            }
            set
            {
                _IsEnabled = value;
            }
        }

        #endregion
        #region Value

        private string _Value;
        public string Value
        { 
            get
            {
                return _Value;
            }
            set
            {
                _Value = value;
            }
        }

        #endregion
        
        public virtual Sidvall.AuthorizationManager.Data.Entity.Entities.AuthorizationScopeResourceItem AuthorizationScopeResourceItem { get; set; }
        
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.AuthorizationManager.Data.Entity.SystemContext.Current.EntityFacade.AuthorizationScopeResourceItemClaimManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowStateIsDirty

        protected override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.AuthorizationManager.Data.Entity.SystemContext.Current.EntityFacade.AuthorizationScopeResourceItemClaimManager.DataRowStateIsDirty(this);
            }
        }

        #endregion

        #region IAuthorizationScopeResourceItemClaim Members

        System.Nullable<long> global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim.AuthorizationScopeResourceItemClaimId
        {
            get
            {
                return this._AuthorizationScopeResourceItemClaimId;
            }
            set
            {
                if (value != null)
                    this.AuthorizationScopeResourceItemClaimId = value.Value;
            }
        }
        long global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim.AuthorizationScopeResourceItemId
        {
            get
            {
                return this._AuthorizationScopeResourceItemId;
            }
            set
            {
                this.AuthorizationScopeResourceItemId = value;
            }
        }
        string global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim.ClaimType
        {
            get
            {
                return this._ClaimType;
            }
            set
            {
                this.ClaimType = value;
            }
        }
        global::Sidvall.Data.ComparisonOperator global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim.ComparisonOperator
        {
            get
            {
                return (global::Sidvall.Data.ComparisonOperator)this._ComparisonOperator;
            }
            set
            {
                this.ComparisonOperator = (int)value;
            }
        }
        bool global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim.IsEnabled
        {
            get
            {
                return this._IsEnabled;
            }
            set
            {
                this.IsEnabled = value;
            }
        }
        string global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim.Value
        {
            get
            {
                return this._Value;
            }
            set
            {
                this.Value = value;
            }
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        IAuthorizationScopeResourceItem global::Sidvall.AuthorizationManager.Data.IAuthorizationScopeResourceItemClaim.AuthorizationScopeResourceItem
        {
            get
            {
                return this.AuthorizationScopeResourceItem;
            }
            set
            {
                this.AuthorizationScopeResourceItem = value as AuthorizationScopeResourceItem;
            }
        }

        #endregion

        #endregion
        #region Constructors

        public AuthorizationScopeResourceItemClaim() : this(false, null, null)
        {
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public AuthorizationScopeResourceItemClaim(bool initializeChildren, Sidvall.Data.IDataRowContextProvider context, Sidvall.Data.DataRowState? dataRowState)
        {
            if ((context != null) || (dataRowState != null))
                SetDataRowContext(context, dataRowState);
            if (initializeChildren)
            {
            }
        }

        #endregion
    }
}